import 'package:flutter_wanandroid_ohos/generated/json/base/json_field.dart';
import 'package:flutter_wanandroid_ohos/generated/json/article_entity.g.dart';
import 'dart:convert';
export 'package:flutter_wanandroid_ohos/generated/json/article_entity.g.dart';

@JsonSerializable()
class ArticleEntity {
	bool adminAdd = false;
	String apkLink = '';
	int audit = 0;
	String author = '';
	bool canEdit = false;
	int chapterId = 0;
	String chapterName = '';
	bool collect = false;
	int courseId = 0;
	String desc = '';
	String descMd = '';
	String envelopePic = '';
	bool fresh = false;
	String host = '';
	int id = 0;
	bool isAdminAdd = false;
	String link = '';
	String niceDate = '';
	String niceShareDate = '';
	String origin = '';
	String prefix = '';
	String projectLink = '';
	int publishTime = 0;
	int realSuperChapterId = 0;
	int selfVisible = 0;
	int shareDate = 0;
	String shareUser = '';
	int superChapterId = 0;
	String superChapterName = '';
	List<ArticleTags> tags = [];
	String title = '';
	int type = 0;
	int userId = 0;
	int visible = 0;
	int zan = 0;

	ArticleEntity();

	factory ArticleEntity.fromJson(Map<String, dynamic> json) => $ArticleEntityFromJson(json);

	Map<String, dynamic> toJson() => $ArticleEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class ArticleTags {
	String name = '';
	String url = '';

	ArticleTags();

	factory ArticleTags.fromJson(Map<String, dynamic> json) => $ArticleTagsFromJson(json);

	Map<String, dynamic> toJson() => $ArticleTagsToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}